package com.zzj.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zzj.entity.Comment;
import com.zzj.mapper.CommentMapper;
import com.zzj.model.vo.CommentVo;
import com.zzj.service.ICommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 评论表 服务实现类
 * </p>
 *
 * @author zzj
 * @since 2023-07-17
 */
@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements ICommentService {

    @Override
    public IPage<CommentVo> findByTargetId(Page<?> page, int targetID,int targetType) {
        return this.baseMapper.findByTargetId(page, targetID,targetType);
    }

    @Override
    public CommentVo findById(int id) {
        return this.baseMapper.findById(id);
    }
}
